<?php
/*------------------------------------------------------------------------

# TZ Portfolio Extension

# ------------------------------------------------------------------------

# author    TranLamTemPlaza

# copyright Copyright (C) 2012 templaza.com. All Rights Reserved.

# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL

# Websites: http://www.templaza.com

# Technical Support:  Forum - http://templaza.com/Forum

-------------------------------------------------------------------------*/

defined('_JEXEC') or die;
$doc = JFactory::getDocument();
$doc->addStyleSheet('modules/mod_tz_teaser_slide/css/style.css');
$doc->addStyleSheet('modules/mod_tz_teaser_slide/showbizpro/css/settings.css');
$doc->addStyleSheet('modules/mod_tz_teaser_slide/showbizpro/fancybox/jquery.fancybox.css?v=2.1.3');
$doc->addScript('modules/mod_tz_teaser_slide/showbizpro/fancybox/jquery.fancybox.pack.js?v=2.1.3');
$doc->addScript('modules/mod_tz_teaser_slide/showbizpro/js/jquery.themepunch.showbizpro.min.js');

?>


<div class="divide30"></div>

<!-- THE NAVIGATION  -- OUTSIDE THE SHOWBIZ CONTAINER FOR BG COLORISING-->
<div class="showbiz-navigation center sb-nav-dark">
    <a id="showbiz_left_4" class="sb-navigation-left"><i class="sb-icon-left-open"></i></a>
    <a id="showbiz_play_4" class="sb-navigation-play"><i class="sb-icon-play sb-playbutton"></i><i class="sb-icon-pause sb-pausebutton"></i></a>
    <a id="showbiz_right_4" class="sb-navigation-right"><i class="sb-icon-right-open"></i></a>
    <div class="sbclear"></div>
</div> <!-- END OF THE NAVIGATION -->

<div class="divide20"></div>


<!-- DEMO IV. -->
<div id="example4" class="showbiz-container darkbg">

    <!--	THE PORTFOLIO ENTRIES	-->
    <div class="showbiz" data-left="#showbiz_left_4" data-right="#showbiz_right_4" data-play="#showbiz_play_4">
        <!-- THE OVERFLOW HOLDER CONTAINER, DONT REMOVE IT !! -->
        <div class="overflowholder">

            <!-- LIST OF THE ENTRIES -->
            <ul>
                <?php
                for($i=0;$i<count($rows);$i++){
                    ?>
                    <!-- AN ENTRY HERE WITH PREDEFINED SHOWCASE SKIN-->
                    <li class="sb-showcase-skin">
                        <?php
                        if($show_image == 1){
                            ?>
                            <!-- THE MEDIA HOLDER HERE -->
                            <div class="mediaholder ">
                                <div class="mediaholder_innerwrap">
                                    <img alt="" src="<?php echo JUri::base().substr($rows[$i] ->images,0,69)."_L.".substr($rows[$i] ->images,70,80);?>">
                                </div>
                            </div><!-- END OF MEDIA CONTAINER -->
                        <?php
                        }
                        ?>

                        <!-- SOME ALWAYS VISIBLE CONTENT -->
                        <div class="detailholder">
                            <?php
                            if($show_title == 1){
                                ?>
                                <h4 class="showbiz-title txt-center"><a href="<?php echo $rows[$i] ->link;?>"><?php echo $rows[$i] ->title;?></a></h4>
                                <div class="divide5"></div>
                            <?php
                            }
                            if($show_introtext == 1){
                                ?>
                                <p class="txt-center"><?php echo substr($rows[$i] ->introtext,0,200);?></p>
                            <?php
                            }
                            ?>
                        </div><!-- END OF DEATIL CONTAINER -->

                        <!-- THE REVEAL CONTAINER - OPENING IN FULLWIDTH -->
                        <div class="reveal_container tofullwidth">

                            <!-- THE REVEL HIDDEN / VISIBLE CONTAINER -->
                            <div class="reveal_wrapper">
                                <!-- THE HEIGHT ADJUSTER CONTAINER -->
                                <div class="heightadjuster table">
                                    <?php
                                    if($show_image == 1){
                                        ?>
                                        <!-- TABLE CONSTRUCT FOR LEFT / RIGHT CONTENTS -->
                                        <div class="table-cell onethird">
                                            <img alt="" src="<?php echo JUri::base().substr($rows[$i] ->images,0,69)."_L.".substr($rows[$i] ->images,70,80);?>" width="100%">
                                        </div>
                                    <?php
                                    }
                                    ?>

                                    <!-- CONTENT IN TABLE -->
                                    <div class="table-cell pl20">
                                        <?php
                                        if($show_title == 1){
                                            ?>
                                            <h3 class="showbiz-title large"><?php echo $rows[$i] ->title;?></h3>
                                            <div class="divide20"></div>
                                        <?php
                                        }
                                        if($show_introtext ==1){
                                            ?>
                                            <p><?php echo $rows[$i] ->introtext;?></p>
                                        <?php
                                        }
                                        ?>
                                        <div class="divide20"></div>
                                        <p class="orange bigger bolder">Special Offer:</p>
                                        <div class="showbiz-price"><span class="currency">$</span><span class="number">25.49</span></div>
                                        <a class="showbiz-button">Purchase Now</a>
                                    </div><!-- END OF CONTENT  -->

                                </div><!-- END OF HEIGHT ADJUSTER CONTAINER -->
                            </div><!-- END OF REVEAL HIDDEN/VISIBLE CONTAINER -->

                            <!-- THE CLOSER / OPENER FUNCTION -->
                            <a class="reveal_opener opener_big_grey">
                                <span class="openme">+</span>
                                <span class="closeme">-</span>
                            </a><!-- END OF CLOSER / OPENER -->

                        </div><!-- END OF THE REVEAL CONTAINER -->
                    </li><!-- END OF ENTRY -->
                <?php
                }
                ?>
            </ul>
            <div class="sbclear"></div>
        </div> <!-- END OF OVERFLOWHOLDER -->
        <div class="sbclear"></div>
    </div>
</div><!-- END OF DEMO IV. -->


<div class="divide30"></div>


<script type="text/javascript">

    jQuery(document).ready(function() {

        jQuery('#example4').showbizpro({
            dragAndScroll:"<?php if($drag_and_scroll==1){echo "on";} else echo "off";?>",
            visibleElementsArray:[5,3,2,1],
            carousel:"<?php if($carousel==1){echo "on";} else echo "off";?>",
            rewindFromEnd:"<?php if($rewind_from_end==1){echo "on";} else echo "off";?>",
            autoPlay:"<?php if($auto_play==1){echo "on";} else echo "off";?>",
            delay:<?php echo $delay;?>,
            speed:<?php echo $speed;?>
        });

        // THE FANCYBOX PLUGIN INITALISATION
        jQuery(".fancybox").fancybox();

    });

</script>